#define ASSERT(_p) \
if ( !(_p) ) { printk("Assertion '%s' failed, line %d, file %s", #_p , \
__LINE__, __FILE__); *(int*)0=0; }
-#define DPRINTK(_f, _a...) printk("(file=%s, line=%d) " _f, \
+#define DPRINTK(_f, _a...) printk(KERN_ALERT "(file=%s, line=%d) " _f, \
__FILE__ , __LINE__ , ## _a )
#else
#define ASSERT(_p) ((void)0)
#include <asm/ctrl_if.h>
#include <asm/evtchn.h>
+#if 0
+#define DPRINTK(_f, _a...) printk(KERN_ALERT "(file=%s, line=%d) " _f, \
+ __FILE__ , __LINE__ , ## _a )
+#else
+#define DPRINTK(_f, _a...) ((void)0)
+#endif
+
/*
* Only used by initial domain which must create its own control-interface
* event channel. This value is picked up by the user-space domain controller
{
msg = &ctrl_if->tx_ring[MASK_CONTROL_IDX(ctrl_if_tx_resp_cons)];
+ DPRINTK("Rx-Rsp %u/%u :: %d/%d\n",
+ ctrl_if_tx_resp_cons,
+ ctrl_if->tx_resp_prod,
+ msg->type, msg->subtype);
+
/* Execute the callback handler, if one was specified. */
if ( msg->id != 0xFF )
{
{
pmsg = &ctrl_if->rx_ring[MASK_CONTROL_IDX(ctrl_if_rx_req_cons++)];
memcpy(&msg, pmsg, offsetof(ctrl_msg_t, msg));
+
+ DPRINTK("Rx-Req %u/%u :: %d/%d\n",
+ ctrl_if_rx_req_cons-1,
+ ctrl_if->rx_req_prod,
+ msg.type, msg.subtype);
+
if ( msg.length != 0 )
memcpy(msg.msg, pmsg->msg, msg.length);
+
if ( test_bit(msg.type, &ctrl_if_rxmsg_blocking_context) )
{
pmsg = &ctrl_if_rxmsg_deferred[MASK_CONTROL_IDX(
msg->id = i;
}
+ DPRINTK("Tx-Req %u/%u :: %d/%d\n",
+ ctrl_if->tx_req_prod,
+ ctrl_if_tx_resp_cons,
+ msg->type, msg->subtype);
+
memcpy(&ctrl_if->tx_ring[MASK_CONTROL_IDX(ctrl_if->tx_req_prod)],
msg, sizeof(*msg));
wmb(); /* Write the message before letting the controller peek at it. */
* In this situation we may have src==dst, so no copying is required.
*/
spin_lock_irqsave(&ctrl_if_lock, flags);
+
+ DPRINTK("Tx-Rsp %u :: %d/%d\n",
+ ctrl_if->rx_resp_prod,
+ msg->type, msg->subtype);
+
dmsg = &ctrl_if->rx_ring[MASK_CONTROL_IDX(ctrl_if->rx_resp_prod)];
if ( dmsg != msg )
memcpy(dmsg, msg, sizeof(*msg));
+
wmb(); /* Write the message before letting the controller peek at it. */
ctrl_if->rx_resp_prod++;
+
spin_unlock_irqrestore(&ctrl_if_lock, flags);
ctrl_if_notify_controller();